package cn.iocoder.yudao.module.trade.scan.service;

import cn.iocoder.yudao.framework.business.order.pojo.vo.OrderSubmitVO;
import cn.iocoder.yudao.framework.business.order.service.AppOrderService;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.trade.scan.vo.*;
import jakarta.validation.Valid;

import java.util.Set;

/**
 * 线下扫码订单 Service 接口
 *
 * @author 山野羡民
 */
public interface AppScanOrderService extends AppOrderService<AppScanOrderVO, ScanOrderSubmitDTO> {

    NewCustomerCheckVO checkCustomer(Long shopId, Long userId);

    ScanOrderPreviewVO preview(ScanOrderSubmitDTO submitVO, Long userId);

    PageResult<AppScanOrderVO> getPage(Integer pageNo, Integer pageSize, Long userId);

    PageResult<AppScanOrderVO> getPageForShop(Integer pageNo, Integer pageSize, Set<Long> shopIds);

    boolean isNewShopCustomer(Long shopId, Long userId);

    OrderSubmitVO submitForNewCustomer(@Valid NewCustomerSubmitDTO reqVO, Long userId);

}